﻿<template id="vue-select-template">
    <div class="input-group ">
        <input type="text" class="form-control" placeholder="{{placeholder}}" v-model="value" disabled>
        <input type="hidden" v-model="key" />
        <div class="input-group-btn">
            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                {{buttonText}}
                <span class="fa fa-caret-down"></span>
            </button>
            <button type="button" class="btn btn-default " title="清除条件" v-on:click="clear"><i class="fa fa-eraser"></i></button>
            <ul class="dropdown-menu dropdown-menu-right"  style="max-height: 300px; overflow:auto">
                <li>
                    <div class="input-group">
                        <span class="input-group-addon"><i class="fa fa-search"></i></span>
                        <input type="text" class="form-control" placeholder="搜索" v-model="filterKey">
                    </div>
                </li>  
                <li v-for="item in items  | filterBy filterKey"><a href="#" v-on:click="selectItem(item)">{{item.value}}</a></li>
            </ul>
        </div>
    </div>
</template>
